package group.program.properties;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class DataSourceProperties {
    private String name;
    private String type="com.alibaba.druid.pool.DruidDataSource";
    private String driverClassName="com.mysql.cj.jdbc.Driver";
    private String url;
    private String username;
    private String password;

//    public String toYAML() {
//        return String.format("      name: %s\n      type: %s\n      driver-class-name: %s\n" +
//                        "      url: %s\n      username: %s\n      password: %s",
//                this.name, this.type, this.driverClassName, this.url, this.username, this.password);
//    }
}
